



//
//  ReadFeelingsViewController.m
//  ZQLearn
//
//  Created by 朵 on 2019/5/12.
//  Copyright © 2019 macfeel. All rights reserved.
//

#import "ReadFeelingsViewController.h"
#import "BookDetialTableViewCell.h"
@interface ReadFeelingsViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,strong)UITableView *tableView;
@property (nonatomic,strong)NSMutableArray *dataArray;

@property (nonatomic,strong)NSArray *names;
@property (nonatomic,strong)NSArray *contents;
@property (nonatomic,strong)NSArray *dates;

@end

@implementation ReadFeelingsViewController

#define cellIdentifier @"bookdetail"
-(UITableView *)tableView{
    if (!_tableView) {
        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0 , 1.5, ScreenWidth , ScreenHeight-ScreenHeightFlex) style:UITableViewStylePlain];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        _tableView.rowHeight = 70;
        _tableView.backgroundColor = kBackgroundColor;
        [_tableView registerNib:[UINib nibWithNibName:@"BookDetialTableViewCell" bundle:nil] forCellReuseIdentifier:cellIdentifier];
        //        WeakStament(ws);
        //        _tableView.mj_header = [CustomRefreshHeader headerWithRefreshingBlock:^{
        //            [ws refreshData];
        //        }];
        _tableView.showsVerticalScrollIndicator = NO;
        _tableView.tableFooterView = [UIView new];
        
    }
    return _tableView;
}

- (void)viewDidLoad {
    
    [super viewDidLoad];
     [self.navigationItem setItemWithTitle:@"读后感" textColor:kNavigationTitleColor fontSize:18 itemType:center];
    
    self.names = @[@"ZQ18788890765",@"ZQ18619082351",@"ZQ1870065765",];
    self.contents = @[@"还不错",@"给点个赞",@"nice,I like",];
    self.dates = @[@"2019-03-01",@"2019-04-21",@"2019-05-15",];
    
    [self.view addSubview:self.tableView];
    
    // Do any additional setup after loading the view from its nib.
}

#pragma mark - datasource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    //视频
    BookDetialTableViewCell *cell  = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
    //        NewsModel *model = self.dataArray[indexPath.row];
    //        [videoCell.headImg sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kPicServerUrl,model.photo]] placeholderImage:nil];
    //        videoCell.titleLab.text = model.title;
    cell.nameLab.text = self.names[indexPath.row];
    cell.contentLab.text = self.contents[indexPath.row];
    cell.timeLab.text = self.dates[indexPath.row];
    return cell;
    
    
}


@end
